<literal>
    <style>
        .help-inline{
            color: red;
        }
        .blue{
            color: #000000;
        }
    </style>
    <script>
            function login_form(){
                var url = $('#form_login').attr('action');
                var user_id  = $('#form_login input[name="user_id"]').val();
                var password = $('#form_login input[name="password"]').val();
                $.post(url,{user_id:user_id,password:password},function(xhr){
                    if(xhr.status){
                        location.reload();
                    }else{
                        $('#form_login span[node-type="span-password"]').html(xhr.info);
                        $('#form_login span[node-type="span-password"]').show();
                    }
                })
            }
    </script>
</literal>
<!--start 登录弹出框-->
<div id="login" class="modal hide fade in" style="display: none; ">
    <div class="modal-header">
        <a class="close" data-dismiss="modal">×</a>
        <h3>Login</h3>
    </div>
    <form class="well" method="post" action="{:U('User/login/')}" id="form_login">
        <div class="modal-body">
            <label>User Name(Student ID)</label>
            <input type="text" class="span3" placeholder="Student ID" name="user_id" >
            <label>Password</label>
            <input type="password" class="span3" placeholder="Password" name="password">
            <span class="help-inline" node-type="span-password" style="display: none"></span>
            <label class="checkbox">
                <input type="checkbox" name="rember_me">Rember Me
            </label>
        </div>
        <div class="modal-footer">
            <button class="btn btn-success" type="button" onclick="javascript:login_form()">Login</button>
            <!--<button class="btn" data-dismiss="modal">Close</button>-->
            <span class="help-inline blue">No account number? Please <a  href="javascript:exchange_tab('login','register')">register</a></span>
        </div>
    </form>
</div>
<!--end 登录弹出框-->

<!--start 注册弹出框-->
<div id="register" class="modal hide fade in" style="display: none; ">
    <div class="modal-header">
        <a class="close" data-dismiss="modal">×</a>
        <h3>Register</h3>
    </div>
    <form class="well" id="register_form" action="{:U('User/register')}" url="{:U('User/userExist')}" method="post">
        <div class="modal-body">
            <p>本校学生无需注册，可使用学号登陆，初始密码为123456</p>
            <label>User Name(Student ID)</label>
            <input type="text" class="span3" placeholder="Student ID" name="user_id">*
            <span class="help-inline" node-type="span-user-id" style="display: none" v="">user_id</span>
            <label>Nick Name</label>
            <input type="text" class="span3" placeholder="Password" name="nick_name">
            <span class="help-inline" node-type="span-nick-name"></span>
            <label>Password</label>
            <input type="password" class="span3" placeholder="Password" name="password">*
            <span class="help-inline" node-type="span-password" style="display: none"></span>
            <label>Repeat password</label>
            <input type="password" class="span3" placeholder="Password" name="repeat_pass">*
            <span class="help-inline" node-type="span-repeat-pass" style="display: none"></span>
        </div>
        <div class="modal-footer">
            <button class="btn btn-success" type="submit" id="sub_register">Register</button>
            <!--<button class="btn" data-dismiss="modal">Close</button>-->
            <span class="help-inline blue">Existing account? Please <a href="javascript:exchange_tab('register','login')">Login</a></span>
        </div>
    </form>
</div>
<!--end 注册弹出框-->